//---------------------------------------------------------------------
// Copyright (C) 2010 - Cobalt Solution / Sebastien Leon              |
//---------------------------------------------------------------------
// This software is under dual licence: commercial licence + GPL v3   |
// To keep closed your modification of this software, you need to     |
// contact me to obtain a commercial licence.                         |
// Any other derivated work should remain Open Source.                |
// Contact me for a licence, a question or if you want to commit      |
// your code to the main tree: seb at cobaltsolutions dot info        |
//---------------------------------------------------------------------

#ifndef _EDITLOOM_H_
#define _EDITLOOM_H_

#include "ui_EditLoom.h"

class Loom;

class EditLoom : public QDialog
{
  Q_OBJECT
public:
  enum EActionOnLoom {
    e_create,
    e_show,
    e_edit
  };

  enum EReturnCode {
    e_reject = QDialog::Rejected,
    e_accept = QDialog::Accepted,
    e_remove = -1
  };

  EditLoom(QWidget* parent, Loom& loom, EActionOnLoom action);
  ~EditLoom() {};

  void UpdateGui  ();
  void UpdateColor();
private:
  Ui::EditLoom  ui;
  Loom&         mr_loom;
  EActionOnLoom m_action;
public slots:
  virtual void accept();
          void selectColor();
  void ftpExplore ();
  void deleteJC   ();
};

#endif // _EDITLOOM_H_